<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
   
</head>

<body>

    <!-- 布局结构 -->
    <!-- 整个放大镜区域 -->
    <div class="box" id="box">

        <!-- 正常显示图片区域 -->
        <div class="show">
            <img src="./imgs/1.jpg" alt="">

            <!-- 遮罩层盒子 -->
            <div class="mask"></div>
        </div>

        <!-- 图片切换列表 -->
        <div class="list">
            <img class="active" src="./imgs/1.small.jpg" data-show="./imgs/1.jpg" data-bg="./imgs/1.big.jpg" alt="">

            <img src="./imgs/2.small.jpg" data-show="./imgs/2.jpg" data-bg="./imgs/2.big.jpg" alt="">
        </div>

        <!-- 放大镜的盒子 -->
        <div class="enlarge">
            <img src="./imgs/1.big.jpg" alt="">
        </div>
    </div>
    <script src="./fangdajing.js"></script>
    <script>
        // 调用
        let e = new Enlarge('#box')
        console.log(e);
    </script>
</body>

</html>